/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  							 script_simple_action.cpp

	$Header: /heroes4/script_simple_action.cpp $

	$NoKeywords: $

 ************************************************************************/
#include "precompiled.h"
#pragma warning( disable: 4786 )

#include "script_simple_action.h"

#include "owned_adv_object.h"

// --------------------------------------------------------------------------
// t_script_simple_action members
// --------------------------------------------------------------------------

// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
bool t_script_simple_action::read_from_map(
	std::streambuf &	stream,
	int					format_version )
{
	return true;
}

bool t_script_simple_action::read( std::streambuf& stream, int version )
{
	return true;
}

bool t_script_simple_action::write( std::streambuf& stream ) const
{
	return t_abstract_script_action::write( stream );
}

void t_script_remove::execute(t_script_context_hero const& context) const
{
	flag_for_removal();
}

void t_script_remove::execute(t_script_context_town const& context) const
{
	flag_for_removal();
}

void t_script_remove::execute(t_script_context_object const& context) const
{
	flag_for_removal();
}

void t_script_remove::execute(t_script_context_army const& context) const
{
	flag_for_removal();
}

void t_script_remove::execute(t_script_context_global const& context) const
{
	flag_for_removal();
}

void t_script_remove_this_adv_object::execute(t_script_context_hero const& context) const
{
	assert(false);
}

void t_script_remove_this_adv_object::execute(t_script_context_town const& context) const
{
	assert(false);
}

void t_script_remove_this_adv_object::execute(t_script_context_object const& context) const
{
	assert(false);
}

void t_script_remove_this_adv_object::execute(t_script_context_army const& context) const
{
	if (context.removal_object != NULL)
	{
		context.removal_object->destroy();
	}
}

void t_script_remove_this_adv_object::execute(t_script_context_global const& context) const
{
	assert(false);
}


